Optimal. Leaf size=194 \[ \frac {2 B \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{5/2} d}+\frac {(3 A-43 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(3 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.38, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4104, 4108,
3893, 212, 3886, 221} \begin {gather*} \frac {(3 A-43 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {2 B \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{5/2} d}+\frac {(A-B) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{4 d (a \sec (c+d x)+a)^{5/2}}+\frac {(3 A-11 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{16 a d (a \sec (c+d x)+a)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 221
Rule 3886
Rule 3893
Rule 4104
Rule 4108
Rubi steps
\begin {align*} \int \frac {\sec ^{\frac {5}{2}}(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^{5/2}} \, dx &=\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {\int \frac {\sec ^{\frac {3}{2}}(c+d x) \left (\frac {3}{2} a (A-B)+4 a B \sec (c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(3 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {\int \frac {\sqrt {\sec (c+d x)} \left (\frac {1}{4} a^2 (3 A-11 B)+8 a^2 B \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{8 a^4}\\ &=\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(3 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(3 A-43 B) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx}{32 a^2}+\frac {B \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{a^3}\\ &=\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(3 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {(3 A-43 B) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{16 a^2 d}-\frac {(2 B) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^3 d}\\ &=\frac {2 B \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{5/2} d}+\frac {(3 A-43 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(A-B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(3 A-11 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(570\) vs. \(2(194)=388\).
time = 5.39, size = 570, normalized size = 2.94 \begin {gather*} \frac {16 (3 A-11 B) \text {ArcSin}\left (\sqrt {1-\sec (c+d x)}\right ) \cos ^5\left (\frac {1}{2} (c+d x)\right ) \sec ^3(c+d x) \sin \left (\frac {1}{2} (c+d x)\right )+16 (3 A-43 B) \text {ArcSin}\left (\sqrt {\sec (c+d x)}\right ) \cos ^5\left (\frac {1}{2} (c+d x)\right ) \sec ^3(c+d x) \sin \left (\frac {1}{2} (c+d x)\right )+6 A \sqrt {1-\sec (c+d x)} \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)-22 B \sqrt {1-\sec (c+d x)} \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)+14 A \sqrt {1-\sec (c+d x)} \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)-30 B \sqrt {1-\sec (c+d x)} \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)-3 \sqrt {2} A \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \tan (c+d x)+43 \sqrt {2} B \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \tan (c+d x)-6 \sqrt {2} A \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \sec (c+d x) \tan (c+d x)+86 \sqrt {2} B \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \sec (c+d x) \tan (c+d x)-3 \sqrt {2} A \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \sec ^2(c+d x) \tan (c+d x)+43 \sqrt {2} B \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \sec ^2(c+d x) \tan (c+d x)}{32 d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(549\) vs.
\(2(163)=326\).
time = 8.34, size = 550, normalized size = 2.84
method | result | size |
default | \(\frac {\left (-1+\cos \left (d x +c \right )\right )^{2} \left (16 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (-1-\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sin \left (d x +c \right ) \sqrt {2}\, \cos \left (d x +c \right )+16 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sin \left (d x +c \right ) \sqrt {2}\, \cos \left (d x +c \right )+3 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )-3 A \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}-43 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )+16 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (-1-\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right )+16 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right )+11 B \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+3 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right )-4 A \cos \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}-43 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right )+4 B \cos \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+7 A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}-15 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (\cos ^{3}\left (d x +c \right )\right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {5}{2}}}{16 d \sin \left (d x +c \right )^{5} \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, a^{3}}\) | \(550\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 89320 vs.
\(2 (163) = 326\).
time = 23.62, size = 89320, normalized size = 460.41 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 339 vs.
\(2 (163) = 326\).
time = 1.81, size = 749, normalized size = 3.86 \begin {gather*} \left [-\frac {\sqrt {2} {\left ({\left (3 \, A - 43 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (3 \, A - 43 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (3 \, A - 43 \, B\right )} \cos \left (d x + c\right ) + 3 \, A - 43 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 32 \, {\left (B \cos \left (d x + c\right )^{3} + 3 \, B \cos \left (d x + c\right )^{2} + 3 \, B \cos \left (d x + c\right ) + B\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) - \frac {4 \, {\left ({\left (3 \, A - 11 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (7 \, A - 15 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{64 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}, -\frac {\sqrt {2} {\left ({\left (3 \, A - 43 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (3 \, A - 43 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (3 \, A - 43 \, B\right )} \cos \left (d x + c\right ) + 3 \, A - 43 \, B\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )}}{a \sin \left (d x + c\right )}\right ) - 32 \, {\left (B \cos \left (d x + c\right )^{3} + 3 \, B \cos \left (d x + c\right )^{2} + 3 \, B \cos \left (d x + c\right ) + B\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right ) - \frac {2 \, {\left ({\left (3 \, A - 11 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (7 \, A - 15 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{32 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________